Most FaceWare modules contain some resources that can be removed if the corresponding functionality is not used. This is especially true with ViewIt since it contains a large number of resources used to support its editing mode and on-line help, neither of which are necessary to open ViewIt windows. The following discussion outlines the steps you can take to customize resources, add modules to an existing application file, and/or remove unused resources.
Shared FaceWare File
During development of programs that use ViewIt, it is best to keep ViewIt and other FaceWare modules in the shared "FaceWare" file. Not only does this make modules available to more than one program under development, but it saves time since you can run your programs without having to wait for resources to be added after each compilation.
Upon completion of a project, you have the option of either moving a copy of the FaceWare modules that your program uses to the final application file, or of distributing a copy of the FaceWare file with your application. The first approach tends to be used by developers of commercial products, and the latter by in-house developers who find it convenient to keep one copy of the FaceWare file in their System folder.
Customizing Resources
Even if you decide not to combine modules with your final application file, you may still find it useful to copy some of their resources to your file so that they can be customized. These custom versions will be used in place of the ones in the FaceWare file since the program file gets precedence over the FaceWare file when searching for resources. The creation of a local copy ensures that (1) the FaceWare file is never corrupted, (2) editing done while in ViewIt's edit mode can be saved (the FaceWare file is write-protected while running your program), and (3) the changes made will not affect other programs.
If, for example, you wanted all of ViewIt's prompt strings to appear in French, you could simply use ResEdit to move a copy of ViewIt's STR# resources to your program file (or other resource file used by your program), and translate the English strings to French.
To customize resources, use ViewIt's on-line edit mode, ResEdit, or other resource editor. Fonts, styles, text, window size, positions, etc., can usually be changed without affecting the operation of the parent module. On the other hand, you should avoid changing the order and type of controls in windows unless documentation states that such changes are supported.
Moving Modules
If you decide that entire modules should be added to your application file, then use the "MoveIt" application to move ViewIt and other FaceWare modules between files. To move ViewIt, for example, open the "FaceWare" file and your application file within MoveIt, and then move ViewIt from the FaceWare file to your application. ViewIt requires the presence of UtilIt, and also FaceIt if your application uses modeless ViewIt windows.
You'll also need to add any control drivers that are used to support the controls in your windows (such as BaseVw for views, BaseCt for basic controls, HelpCt for on-line help, etc.). Also check the on-line help accompanying modules to see if there are any resources that can be removed when their corresponding functionality is not used. The removal of editing-related resources is described below.
Removing Resources
Experience shows that some developers, particulary those creating commercial products, prefer to hide the fact that any other programming tool was used in their product, or simply don't want users to make use of ViewIt's edit mode to edit their windows. For these programmers, a version of the FaceWare file is provided on the "FaceWare Utilities" disk that contains all of the core FaceWare modules but none of the editing code and help resources associated with these modules. Thus, if you don't want editing-related resources in your finished programs, simply copy modules from this file instead of the complete FaceWare file.
Control drivers and other modules sold separately may also contain editing-related resources that can be removed. See the programmer's guide accompanying each module to determine which resources, if any, can be removed.
Note that the only practical benefit of not including editing resources in your program file is to reduce the file's size since these resources are never loaded into memory until the user enters edit mode. This minor benefit should be weighed against the loss of ViewIt's powerful edit mode.
Also note that, when switching to use of the non-editing version of FaceWare modules, you may find that you have been inadvertently using editing-related resources with your own controls (such as when an SICN-based icon button from a ViewIt editing window is copied for use in your own windows). In this case, either copy the missing resource from the editing version of the FaceWare file and paste it into your resource file, or link the control to a different resource in your resource file.